/*
 * CProcStats.java
 * 
 * Copyright (c) 2009 Giles Millward (Manigra). All rights reserved.
 * 
 * This file is part of JRogueDPS.
 * 
 * JRogueDPS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * JRogueDPS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with JRogueDPS.  If not, see <http://www.gnu.org/licenses/>.
 */

package dpsstats;

/**
 *
 * @author Giles Millward (Manigra)
 */
public class CProcStats {
    public String m_name;
    public double m_procs = 0;
    public double m_procUptime = 0.0;

    public CProcStats(String p_name)
    {
        m_name = p_name;
    }

    public void addProc()
    {
        m_procs++;
    }

    public void addUptime(double p_uptime)
    {
        m_procUptime += p_uptime;
    }

    public void add(CProcStats p_procStats)
    {
        m_procs += p_procStats.m_procs;
        m_procUptime += p_procStats.m_procUptime;
    }

    public void divideBy(int p_iterations)
    {
        m_procs /= p_iterations;
        m_procUptime /= p_iterations;
    }
}
